<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="SubcribeCreateDlg" widgetVar="SubcribeCreateDialog" modal="true" resizable="false" appendTo="@(body)" header="#{bundle.CreateSubcribeTitle}">
            <h:form id="SubcribeCreateForm">
                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{subcribeController.selected != null}">
                        <p:outputLabel value="#{bundle.CreateSubcribeLabel_id}" for="id" />
                        <p:inputText id="id" value="#{subcribeController.selected.id}" title="#{bundle.CreateSubcribeTitle_id}" required="true" requiredMessage="#{bundle.CreateSubcribeRequiredMessage_id}"/>
                        <p:outputLabel value="#{bundle.CreateSubcribeLabel_accountId}" for="accountId" />
                        <p:selectOneMenu id="accountId" value="#{subcribeController.selected.accountId}" >
                            <f:selectItems value="#{accountController.itemsAvailableSelectOne}"
                                           var="accountIdItem"
                                           itemValue="#{accountIdItem}"/>
                        </p:selectOneMenu>
                        <p:outputLabel value="#{bundle.CreateSubcribeLabel_eventId}" for="eventId" />
                        <p:selectOneMenu id="eventId" value="#{subcribeController.selected.eventId}" >
                            <f:selectItems value="#{eventController.itemsAvailableSelectOne}"
                                           var="eventIdItem"
                                           itemValue="#{eventIdItem}"/>
                        </p:selectOneMenu>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{subcribeController.create}" value="#{bundle.Save}" update="display,:SubcribeListForm:datalist,:growl" oncomplete="handleSubmit(args,'SubcribeCreateDialog');"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="SubcribeCreateDialog.hide()"/>
                </h:panelGroup>
            </h:form>
        </p:dialog>

    </ui:composition>
</html>
